//第三章
// 2、定义一个数列：0，1，1，2，3，5，...(斐波那契数列表达式：F[n]=F[n-1]+F[n-2] )
package alltest;
import java.util.Scanner;
public class Text {
    public static void main(String []args){
        Scanner sc = new Scanner(System.in);
        int n;
        n = sc.nextInt();
        System.out.println(f(n));
    }
    static int f(int a){
        if(a==1)
            return 0;
        else if(a==2)
            return 1;
        else
            return f(a-1)+f(a-2);
    }
}
/*
//1、设计一个学生类Student
public class Student {
    String name;
    double score;
    public Student(){};
    public Student(String n,double s){
        name=n;
        score=s;
        System.out.println("s2命名为："+name);
        System.out.println("s2设置成绩："+score);
    }

    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name=name;
        System.out.println("s1命名为：张三");
    }
    public double getScore(){
        return score;
    }
    public void setScore(double score){
        this.score=score;
        System.out.println("s1设置了成绩:99.99");
    }

    public static void main(String[] args) {
        Student s1=new Student();
        Student s2=new Student("李四",100);
        s1.setName("李四");
        s1.setScore(99.99);
    }
}

 */